import Layout from '@/layout'

const clinicRouter = {
  path: '/clinic',
  component: Layout,
  redirect: '/clinicInfo',
  name: 'Clinic',
  meta: {
    title: '门诊管理',
    icon: 'tree-table',
    noCache: true,
    roles: ['myClinic']
  },
  children: [
    {
      path: '/clinicInfo',
      component: () => import('@/views/clinic/index'),
      name: '门诊信息',
      meta: { icon: 'edit', title: '门诊信息', roles: ['clinic:info'] }
    },
    {
      path: '/info',
      component: () => import('@/views/emrInfo/index'),
      name: '病历/检查项',
      meta: { icon: 'edit', title: '病历/检查项', roles: ['clinic:info'] }
    },
    {
      path: '/report',
      component: () => import('@/views/report/report.vue'),
      name: '体检报告设置',
      meta: {
        icon: 'edit', title: '体检报告设置', roles: ['clinic:report'], noCache: false,
      }
    },
    {
      path: '/treatProcess',
      component: () => import('@/views/clinic/treatProcess.vue'),
      name: '接诊模板配置',
      meta: { icon: 'edit', title: '接诊模板配置', roles: ['clinic:info'] }
    },
    {
      path: 'valid',
      component: () => import('@/views/clinic/valid'),
      name: '表单验证',
      hidden: true,
      meta: { icon: 'edit', title: '表单验证', roles: ['myClinic'] }
    }]
}

export default clinicRouter
